//
//  ViewController.m
//  project1115
//
//  Created by lsh93192 on 2024/11/15.
//

#import "ViewController.h"

@interface ViewController ()
@property (nonatomic, strong) UILabel *theTitleLable;///titleLable

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self.view addSubview:self.theTitleLable];
}
- (UILabel *)theTitleLable {
    if (!_theTitleLable) {
        _theTitleLable = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, UIScreen.mainScreen.bounds.size.width, UIScreen.mainScreen.bounds.size.height)];
        _theTitleLable.font = [UIFont systemFontOfSize:16];
        _theTitleLable.textColor = [UIColor systemGreenColor];
        _theTitleLable.numberOfLines = 2;
        _theTitleLable.text = @"lsh占位文案";
        _theTitleLable.textAlignment = NSTextAlignmentCenter;
        _theTitleLable.adjustsFontSizeToFitWidth = YES;////如果换行使用
        [_theTitleLable setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical];////如果换行使用
    }
    return _theTitleLable;
}

@end
